package com.gzyj.jtt808.v2011.enums.addtionalinfo;

import lombok.Getter;

/**
 * 路线行驶返回结果
 *
 * @author lhj
 */
@Getter
public enum JT808_Additional_DrivenRoute {
    不足(0, "不足"),
    过长(1, "过长"),
    ;

    private int code;
    private String name;

    JT808_Additional_DrivenRoute(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static JT808_Additional_DrivenRoute find(int code) {
        for (JT808_Additional_DrivenRoute route : JT808_Additional_DrivenRoute.values()) {
            if (code == route.getCode()) {
                return route;
            }
        }
        return null;
    }
}
